/* 整合网盘主样式的变量 */
:root {
    --primary-color: #2d8cf0;
    --success-color: #19be6b;
    --warning-color: #ff9900;
    --danger-color: #f53f3f;
    --text-color: #1d2129;
    --text-light-color: #86909c;
    --border-color: #e5e6eb;
    --bg-color: #f2f3f5;
    --card-bg-color: #ffffff;
    --hover-bg-color: #f7f8fa;
}

/* 基础样式保持与网盘一致 */
body.disk-body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

.disk-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 20px;
    background-color: var(--card-bg-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-logo a {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-path {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.nav-path a {
    color: var(--text-color);
    text-decoration: none;
}

.nav-path a:hover {
    color: var(--primary-color);
}

.nav-path span {
    margin: 0 8px;
    color: var(--text-light-color);
}

.nav-user {
    font-size: 14px;
}

.disk-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.disk-sidebar {
    width: 220px;
    background-color: var(--card-bg-color);
    border-right: 1px solid var(--border-color);
    padding-top: 20px;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: var(--hover-bg-color);
    color: var(--primary-color);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.disk-main {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

/* PDF编辑器特有样式 */
.pdf-editor-container {
    background-color: var(--card-bg-color);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: calc(100% - 20px);
    display: flex;
    flex-direction: column;
}

.editor-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-title {
    display: flex;
    flex-direction: column;
}

.editor-title h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

#current-file-name {
    margin: 0;
    font-size: 14px;
    color: var(--text-light-color);
}

/* 按钮样式与网盘统一 */
.disk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 15px;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.disk-btn i {
    margin-right: 6px;
}

.disk-btn:hover {
    background-color: var(--hover-bg-color);
    border-color: #d9d9d9;
}

.disk-btn.primary-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.disk-btn.primary-btn:hover {
    background-color: #2b85e4;
}

.disk-btn.success-btn {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: #fff;
}

.disk-btn.success-btn:hover {
    background-color: #18b566;
}

.disk-btn.small-btn {
    padding: 4px 10px;
    font-size: 12px;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-toolbar input[type="file"] {
    display: none;
}

.pdf-toolbar button.active {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #fff;
}

.editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    background-color: #f9f9f9;
}

.pdf-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 100;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pdf-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
}

#pdfCanvas {
    border: 1px solid #e5e5e5;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    margin: 0 auto;
}

.editor-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light-color);
}

.page-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

#pageInfo {
    min-width: 80px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .disk-container {
        flex-direction: column;
    }

    .disk-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }

    .sidebar-menu li {
        margin-bottom: 0;
        margin-right: 5px;
    }

    .sidebar-menu a {
        padding: 8px 15px;
        white-space: nowrap;
    }

    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pdf-toolbar {
        flex-wrap: wrap;
        width: 100%;
    }
}



/*
!* =======================
   全局样式
======================= *!
body {
    margin: 0;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    background-color: #f7f9fb;
    color: #333;
}

.pdf-editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

!* =======================
   顶部工具栏
======================= *!
.pdf-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e8eb;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.pdf-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2b2b2b;
}

!* =======================
   工具栏按钮
======================= *!
.pdf-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-toolbar input[type="file"] {
    display: none;
}

.pdf-toolbar button {
    background-color: #007aff;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 14px;
    font-weight: 500;
}

.pdf-toolbar button:hover {
    background-color: #0062d1;
    box-shadow: 0 2px 6px rgba(0,122,255,0.3);
}

.pdf-toolbar button:active {
    transform: scale(0.96);
}

!* =======================
   主体内容区域
======================= *!
.pdf-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background-color: #f0f2f5;
}

#pdfCanvas {
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s;
}

#pdfCanvas:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

!* =======================
   底部状态栏
======================= *!
.pdf-footer {
    height: 40px;
    background-color: #fff;
    border-top: 1px solid #e5e8eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
}

#statusMsg {
    transition: color 0.3s ease-in-out;
}

!* =======================
   高亮模式提示
======================= *!
.pdf-toolbar button.active {
    background-color: #ffaa00;
    color: #fff;
}

!* =======================
   动画与过渡
======================= *!
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.pdf-editor-container,
.pdf-header,
.pdf-main,
.pdf-footer {
    animation: fadeIn 0.4s ease;
}

!* =======================
   响应式优化
======================= *!
@media (max-width: 768px) {
    .pdf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pdf-toolbar button {
        padding: 6px 12px;
        font-size: 13px;
    }

    #pdfCanvas {
        width: 95%;
    }
}
*/
